//
//  ZYCustomSlider.m
//  YiLin
//
//  Created by Zyark on 2018/6/6.
//  Copyright © 2018年 Zyark. All rights reserved.
//

#import "ZYCustomSlider.h"

@implementation ZYCustomSlider

-(instancetype)initWithFrame:(CGRect)frame withTrackHeight:(CGFloat)trackHeight{
    self = [super initWithFrame:frame];
    if (self) {
        _trackHeight = trackHeight;
    }
    return self;
}

- (CGRect)trackRectForBounds:(CGRect)bounds
{
    if(_trackHeight){
        return CGRectMake(0, 0, CGRectGetWidth(self.frame), _trackHeight);
    }else{
        return CGRectMake(0, 0, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame));
    }
}

@end
